using System;
using Whitemice.MOGI;

namespace Whitemice.MOGI.ZOGI
{	
	public class AuditEntry : Whitemice.MOGI.ZOGI.Document, IAuditEntry
	{
		public AuditEntry(IServer server, Payload payload) 
			: base(server, payload)
		{
		}
		
		public override string Name
		{
			get
			{
				Console.WriteLine("MOGI.ZOGI.AuditEntry.Name_get");
				return "Document/AuditEntry/" + payload.GetStringForKey("objectId");
			}
		}
		
		public string Comment
		{
			get 
			{ 
				return payload.GetStringForKey("message");
			}
		}
		
		public string Actor
		{
			get 
			{ 
				return iserver.GetName(payload.GetStringForKey("actorObjectId"));
			}
		}
		
		public DateTime Time
		{
			get { return payload.GetDateTimeForKey("actionDate"); }
		}
	}
}
